package com.itcoon.demo.task;/**
 * @author Athric Yu
 * 2024/11/26
 **/

import com.itcoon.cloud.framework.model.BootstrapTask;
import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.CompletableFuture;

/**
 *
 *
 * @author Athric Yu
 * 2024/11/26
 **/
//@Component
@Slf4j
public class DemoTask implements BootstrapTask<Void> {

    @Override
    public CompletableFuture<Void> get() {
        return CompletableFuture.runAsync(()-> System.out.println("服务启动了")).whenComplete((value, throwable)->{
            log.info("task completed");
        });
    }
}
